Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extended message for warning when source-linked mode is used outside of the workspace #1929

Merged
merged 3 commits into from
Nov 22, 2024

Conversation

ilyakuz-db
Copy link
Contributor

@ilyakuz-db ilyakuz-db commented Nov 22, 2024

Changes

Added path and locations to the warning which displayed when source-linked mode is used outside of the workspace

@ilyakuz-db ilyakuz-db changed the title feat: Extended message for warning when source-linked is used outside of Workspace feat: Extended message for warning when source-linked mode is used outside of Workspace Nov 22, 2024
@ilyakuz-db ilyakuz-db requested a review from pietern November 22, 2024 12:51
Copy link
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Minor comments.

target := b.Config.Bundle.Target
path := dyn.NewPath(dyn.Key("targets"), dyn.Key(target), dyn.Key("presets"), dyn.Key("source_linked_deployment"))
diags = diags.Extend(
diag.Diagnostics{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use diags.Append and remove one level of nesting.

@@ -225,9 +225,22 @@ func (m *applyPresets) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnos
if config.IsExplicitlyEnabled((b.Config.Presets.SourceLinkedDeployment)) {
isDatabricksWorkspace := dbr.RunsOnRuntime(ctx) && strings.HasPrefix(b.SyncRootPath, "/Workspace/")
if !isDatabricksWorkspace {
target := b.Config.Bundle.Target
path := dyn.NewPath(dyn.Key("targets"), dyn.Key(target), dyn.Key("presets"), dyn.Key("source_linked_deployment"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tail of this key is reusable between here and below.

@pietern pietern changed the title feat: Extended message for warning when source-linked mode is used outside of Workspace Extended message for warning when source-linked mode is used outside of the workspace Nov 22, 2024
@pietern
Copy link
Contributor

pietern commented Nov 22, 2024

Please also update the PR summary to have a description of the change. An image is not great for history/blame.

Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 1929
  • Commit SHA: 7de51dc6dfdabdf5cc7c626dae0270e05de3d90f

Checks will be approved automatically on success.

@eng-dev-ecosystem-bot
Copy link
Collaborator

Test Details: go/deco-tests/11973657649

@pietern pietern enabled auto-merge November 22, 2024 13:53
@pietern pietern added this pull request to the merge queue Nov 22, 2024
Merged via the queue into main with commit 490dd05 Nov 22, 2024
10 checks passed
@pietern pietern deleted the source-linked-warning-log-source branch November 22, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants